/**
 * 小偷
 *
 * @author zhu
 * @date 2024-03-12
 */
public class Thief {
    /**
     * 偷盗的方法
     * @param door 门对象
     */
    public void theft(Door door){
        if (door.lockStatus == "已上锁"){
            Math random = null;
            if (random.random() < 0.5){
                System.out.println("偷盗失败");
            }else {
                System.out.println("偷盗成功");
                door.openDoor();
            }
        }else {
            System.out.println("偷盗成功");
        }
    }
}
